using System;
using System.Globalization;
using System.Windows.Data;

namespace WpfTeleTwitter
{
	public class FormattedTextConverter : IValueConverter
	{
		public object Convert(object value, Type typeTarget, object param, CultureInfo culture)
		{
			string format = param as string;
			if (!String.IsNullOrEmpty(format))
				return String.Format(format, value);

			return value.ToString();
		}
		public object ConvertBack(object value, Type typeTarget, object param, CultureInfo culture)
		{
			return null;
		}
	}
}
